package org.example.pet.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class AdoptionApplication {
    @TableId(value = "application_id", type = IdType.AUTO)
    private Long applicationId;
    private Long petId;
    private Long userId;
    //申请理由
    private String applicationText;
    //家庭环境描述
    private String homeDescription;
    //养宠经验
    private String experience;
    //状态：PENDING-待审核, APPROVED-已通过, REJECTED-已拒绝
    private String status;
    //管理员审核意见
    private String adminNotes;
    //审核时间
    private LocalDateTime responseDate;
    //申请时间
    private LocalDateTime createdAt;

    public enum StatusVal {
        PENDING("PENDING", "待审核"),
        APPROVED("APPROVED", "已通过"),
        REJECTED("REJECTED", "已拒绝"),
        ;

        private String val;
        private String desc;

        StatusVal(String val, String desc) {
            this.val = val;
            this.desc = desc;
        }

        public String getVal() {
            return val;
        }

        public String getDesc() {
            return desc;
        }
        
    }
}
